package org.apache.commons.dbuils;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @author 付大石
 */
public class DbUtils {
    
    private DbUtils() {
        throw new UnsupportedOperationException("不可实例化DbUtils");
    }
    
    public static void close(Connection connection) throws SQLException {
        if(connection != null) {
            connection.close();
        }
    }
    
    public static void close(ResultSet resultSet) throws SQLException {
        if(resultSet != null) {
            resultSet.close();
        }
    }
    
    public static void close(Statement statement) throws SQLException {
        if(statement != null) {
            statement.close();
        }
    }
}
